<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>AutoSqli-TaskList</title>
<link href="/static/css/zxmk.css" rel="stylesheet" type="text/css"/>
<link rel="shortcut icon" href="static/images/favicon.ico">
<script src="/static/js/ajax.js" type="text/javascript"></script>
<script src="/static/js/core.js" type="text/javascript"></script>
<script src="/static/js/jquery-1.11.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
function see_log(taskid){
	var url="/tasklist.html"
	var log_box=document.getElementById("log_box");
	url=url+"?action=seelog&taskid="+taskid;
	loadXMLDocByGet(url,function(){
			if(xmlhttp.readyState==4&&xmlhttp.status==200){
				log_box.innerHTML=xmlhttp.responseText;
				$("#log_box").fadeIn();
			}
		});
	
}
function close_log()
{
	$('#log_box').fadeOut();
}
function update_taskbox(){
	var url="/tasklist.html";
	url=url+"?action=refresh";
	var tasklist_box=document.getElementById("tasklist_box");
	loadXMLDocByGet(url,function(){
		if(xmlhttp.readyState==4&&xmlhttp.status==200){
			tasklist_box.innerHTML=xmlhttp.responseText;
		}
	});
}
function start_task(taskid){
	var url="/tasklist.html";
	url=url+"?action=start&taskid="+taskid;
	loadXMLDocByGet(url,function(){
		if(xmlhttp.readyState==4&&xmlhttp.status==200)
		{
			if(xmlhttp.responseText=="True")
				alert("start scan!")
			else
				alert("can not start scan")
		}
	});
}
function stop_task(taskid){
	var url="/tasklist.html";
	url=url+"?action=stop&taskid="+taskid;
	loadXMLDocByGet(url,function(){
		if(xmlhttp.readyState==4&&xmlhttp.status==200)
		{
			if(xmlhttp.responseText=="True")
				alert("stop scan!")
			else
				alert("can not stop scan")
		}
	});
}
function del_task(taskid){
	var url="/tasklist.html";
	url=url+"?action=delete&taskid="+taskid;
	loadXMLDocByGet(url,function(){
		if(xmlhttp.readyState==4&&xmlhttp.status==200){
			update_taskbox();
		}
	});
}
window.setInterval(update_taskbox,2000);
</script>
<style>
.clear{height: 100px;float: left;clear: both;}
.task_box{width: 900px;float:left;clear: both;font-size: 20px;color: white;border-width: 3px;border-style: solid;border-radius: 8px;padding:10px 40px 10px 40px;margin: 10px 40px 0px 130px;}
#log_box{font-size: 1.25em;position: fixed;color: #2B1D1C;background-color: rgb(251, 250, 250);min-height: 300px;z-index: 99;display: none; top: 100px;left: 170px;opacity: 0.75;padding: 1.5em;word-wrap: break-word;border-radius: 15px;}
.button{float: left;color:white;padding: 5px 15px 5px 15px;border-width: 2px;border-style: solid; border-color: white;border-radius: 4px;margin-left: 10px;margin-top:10px;font-size: 15px;}
.close_button {color: #0E0E0E;padding: 5px 15px 5px 15px;border-width: 2px;border-style: solid;border-color: white;border-radius: 4px;font-size: 15px;background-color: red;width: 50px;text-align: center;}
</style>
</head>
<body>
<div class="top-nav">
  <div class="w1000 clearfix">
    <a href="/">AutoSqli Tools</a>
    <a href="quickbuild.html" style="font-size:15px;padding-left:200px;">Quickly Bulid</a>
    <a href="customtask.html" style="font-size:15px;padding-left:60px;">Custom Task</a>
    <a href="tasklist.html" style="font-size:15px;padding-left:60px;">Task List</a>
    <a href="success.html" style="font-size:15px;padding-left:60px;">Success List</a>
  </div>
  <div class="clear">
  </div>
 </div>
 <div class="tasklist_box" id="tasklist_box">
 {{html|safe}}
 </div>
 <div id="log_box">
 <p></p>
 </div>
</body>
</html>


